/*
 * MinersWife.java
 *
 * Created on March 27, 2007, 4:35 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package ai9hells.pgaibe.chapter2.westworldwithmessaging;

import ai9hells.pgaibe.common.fsm.StateMachine;
import ai9hells.pgaibe.common.messaging.Telegram;

/**
 *
 * @author andre.bandarra
 */
public class MinersWife extends BaseGameEntity{
    private StateMachine<MinersWife> stateMachine = new StateMachine<MinersWife>(this);
    private Locations location = Locations.SHACK;
    private boolean cooking = false;
    /** Creates a new instance of MinersWife */
    public MinersWife(int id) {
        super(id);
        stateMachine.setCurrentState(DoHouseWork.instance);
        stateMachine.setGlobalState(WifesGlobalState.INSTANCE);
    }

    public void update() {
        stateMachine.update();
    }

    public boolean handleMessage(Telegram msg) {
        return stateMachine.handleMessage(msg);
    }

    public boolean isCooking() {
        return cooking;
    }

    public void setCooking(boolean cooking) {
        this.cooking = cooking;
    }

    public StateMachine<MinersWife> getStateMachine() {
        return stateMachine;
    }

    public Locations getLocation() {
        return location;
    }

    public void setLocation(Locations location) {
        this.location = location;
    }
    
}
